import javax.swing.*;
import java.awt.*;

public class Test1 {
    public static void main(String[] args) {
        JFrame window1  = new JFrame("一个窗口");
        Container con = window1.getContentPane() ;
        con.setBackground(Color.yellow);
         window1.setBounds(500 , 50 , 400 , 200);
         window1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         window1.setVisible(true);

    }
}
